package com.example.stock.controller;

import com.example.stock.service.StockWeekMonitorService;
import com.example.stock.util.Result;
import com.example.stock.util.ResultGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin(origins = "*")
@RequestMapping("stockWeekMonitor")
public class StockWeekMonitorController {

    @Autowired
    StockWeekMonitorService stockWeekMonitorService;

    @GetMapping
    public Result index() {
        return ResultGenerator.genSuccessResult(stockWeekMonitorService.getStockWeekMonitors());
    }
}